{ if $ajax != 'true' }
<header>
    <h1>Liste des villes</h1>
</header>
<a class="floatR" href="{ $SYS_FOLDER }ville/classement/">Classement</a>
{$autoCompleteVille}
<br />
<div class="list">
    <table id="listing">
{ /if }
        <thead>
            <tr>
                <th>Nom de la ville</th>
                <th>Département</th>
            </tr>
        </thead>
        <tbody>
        { foreach from=$data item=element }
            <tr>
                <td>
                    <a href="{ $SYS_FOLDER }ville/{ $element.0 }-{ $element.2|replace:' ':'-' }">{ $element.2 }</a>
                </td>
                <td><a href="{ $SYS_FOLDER }departement/{ $element.1.0 }-{ $element.1.3|replace:' ':'-' }">{ $element.1.3 }</a></td>
            </tr>
        { /foreach }
        </tbody>
        <tfoot>
            <tr class="pagination">
                <td colspan="2">
                { section name=p start=$pageStart loop=$pageTotal }
                    { if $smarty.section.p.index <= $pageStop }
                        { if $page == $smarty.section.p.index }
                        { $smarty.section.p.index }
                        { else }
                        <a href="{ $SYS_FOLDER }ville/page-{ $smarty.section.p.index }">{ $smarty.section.p.index }</a>
                        { /if }
                    { /if }
                { /section }
                </td>
            </tr>
        </tfoot>
        { if $ajax != 'true' }
    </table>
</div>
{ /if }